import { http } from "@/utils/http";
import { baseUrlApi } from "./utils";

export type fileResult = {
  success: boolean;
  msg: string;
  data: any;
};

/* 获取全局配置 */
export const getGlobalConfig = () => {
  return http.request<fileResult>("post", baseUrlApi("file/getGlobalConfig"));
};

/** 保存全局配置 */
export const saveGlobalConfig = (data?: object) => {
  return http.request<fileResult>("post", baseUrlApi("file/saveGlobalConfig"), {
    data
  });
};
